package io.renren.controller;

import io.renren.annotation.Login;
import io.renren.common.utils.R;
import io.renren.service.SchoolMajorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/api")
public class SchoolMajorController {

    @Autowired
    SchoolMajorService schoolMajorService;

    /**
     * 列表
     */
    @PostMapping("getUniversitys")
    @Login
    // @RequiresPermissions("school:school:list")
    public R getUniversitys(@RequestBody Map<String, Object> params) {
        List l = schoolMajorService.getUniversitys(params);
        return R.ok().put("universitys", l);
    }

    /**
     * 列表
     */
    @PostMapping("/vip/getVipUniversitys")
    @Login
    // @RequiresPermissions("school:school:list")
    public R getVipUniversitys(@RequestBody Map<String, Object> params) {
        List l = schoolMajorService.getVipUniversitys(params);
        return R.ok().put("universitys", l);
    }

    /**
     * 列表
     */
    @PostMapping("/vip/getLowscore")
    @Login
    // @RequiresPermissions("school:school:list")
    public R getLowscore(@RequestBody Map<String, Object> params) {
        List l = schoolMajorService.getLowscore(params);
        return R.ok().put("lowscore", l);
    }

    /**
     * 列表
     */
    @PostMapping("/vip/getProfression")
    @Login
    // @RequiresPermissions("school:school:list")
    public R getProfression(@RequestBody Map<String, Object> params) {
        List l = schoolMajorService.getProfression(params);
        return R.ok().put("profression", l);
    }
}
